/**
 * @Author  : longming
 * @Contact : 451904906@qq.com
 * @Time    : 2017/10/19
 * @Desc    : 站内所有的公用组件
 *
 */

import ThHeader from "../../components/header" //所有页面头部
// import THGoodList from "../../components/preGoodList" //所有页面头部
import THSwiper from "vue-awesome-swiper"

// import footer from "../../components/footer" //所有页面的尾部
// import sidebar from "../../components/sidebar" //所有页面右下角的工具栏
// import MessageBox from "@/components/popup"
// import popupLogin from "@/components/popupLogin"
// import pagination from "@/components/pagination"
// import blockTip from "@/components/blockTip"
// import slide from "@/components/slide"

// const components = [inputBounce, Login, header, footer, sidebar, pagination, blockTip, slide]
const components = [ThHeader]

const install = function(Vue, opts = {}) {
    /* istanbul ignore if */
    if (install.installed) return

    components.map(component => {
        Vue.component(component.name, component)
    })

    // Vue.use(MessageBox)
    // Vue.prototype.$msgBox = MessageBox.show
    // Vue.prototype.$popupLogin = popupLogin
    Vue.use(THSwiper)
}

if (typeof window !== "undefined" && window.Vue) {
    install(window.Vue)
}

export default {
    version: "1.0.0",
    install,
    ThHeader
    // THSwiper
}
